import request from '@/utils/request'

/**
 * 视频列表
 * @param {Object} params 
 */
export function queryVideoPage(params) {
    return request({
        url: '/system/video/list',
        method: 'get',
        params: params
    })
}


/**
 * 视频导出
 * @param {String} id 
 */
export function videoExport(data) {
    return request({
        url: '/system/video/export',
        method: 'post',
        data: data
    })
}


/**
 * 视频详情
 * @param {String} id 
 */
export function queryVideoDetail(id) {
    return request({
        url: '/system/video/' + id,
        method: 'get'
    })
}

/**
 * 新增视频
 * @param {Object} data 
 */
export function addVideo(data) {
    return request({
        url: '/system/video',
        method: 'post',
        data: data
    })
}


/**
 * 编辑视频
 * @param {Object} data 
 */
export function editVideo(data) {
    return request({
        url: '/system/video',
        method: 'put',
        data: data
    })
}


/**
 * 删除视频
 * @param {String} ids 
 */
export function deleteVideo(ids) {
    return request({
        url: '/system/video/' + ids,
        method: 'delete',
    })
}


/**
 * 首页隐藏视频
 * @param {String} ids 
 */
export function hideVideoByHome(ids) {
    return request({
        url: '/system/video/unRecommend/' + ids,
        method: 'put',
    })
}

/**
* 首页显示视频
* @param {String} ids 
*/
export function showVideoByHome(ids) {
    return request({
        url: '/system/video/recommend/' + ids,
        method: 'put',
    })
}